home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Programming
/
DiceSource
/
test
/
suplib
/
strdup.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-25
|
173b
|
15 lines
#include <stdlib.h>
#include <string.h>
char *
strdup(const char *str)
{
char *ptr;
if (ptr = malloc(strlen(str) + 1))
strcpy(ptr, str);
return(ptr);
}